Oreo triggers is an SCMDraft trigger preprocessor that runs on php. More than a macro-triggerer, it adds modularity, intuitive triggering, EUD and Deathcounter support, helps you manage your resources and allows for custom built actions and conditions.
( It doesn't let you do anything you couldn't already do in Scmdraft, it just helps you do it more easily. )
Note about php:
If I had started with what this project ended up being in mind (and if I had planned to release it to people) I wouldn't've used php. As it happens, I originally started this as a simple preprocessor for Wormer's Macrotriggers (to add another layer of abstraction), which, at that level php was a natural choice. As it stands, however, php is great for people just being introduced to programming as it is a loosely typed language. To use Oreo triggers, you'll have to familiarize yourself with the php syntax (or at least, how it's used in Oreo triggers).
Just so you have a better idea of what this is before I go on, here's an example of what triggers might look like using Oreo triggers:
Example
Its Result
Installation and Usage
1. Install/Setup Oreos package
- Install a local php server (I use Zend Server CE)
- Download the Oreos Package (link below)
- Unzip and place the Oreos folder in either your htdocs (windows) or public_html (linux) server folder (for Zend Server CE on Windows it should be ProgramFiles/Zend/Apache2/htdocs)
- Oreo projects are just php files that have:
<?php require_once('Oreos/initialize.php');
at the beginning and:
?>
at the end. The actual oreo code you write will be in-between. You can edit .php files with any text editor, although it is best to use a programming environment that supports php.
4. Visit your project in a web browser to generate the triggers
- Visiting your php file in a browser causes the php script to execute (and thus generate your map's triggers).
- If you created your project in your web root (public_html or htdocs folder) then the url to visit the project will be:
localhost/projectname.php
Using Mint
After some collaboration with yoonkwun (thanks yoonkwun), we developed an extension called 'Mint', which lets you write triggers to your map merely by compiling. With Mint enabled, you no longer have to copy/paste the generated text into Scmdraft, the triggers are added for you. This also gives you the ability to generate units and locations to your map within Oreo trigs. (Mint is not a separate download, its included in the Oreos package, and is completely optional).
To use mint, you must provide a path to your input file and an output file path to the Mint() function. Ex:
Mint takes your input map file and adds the triggers Oreo generates to it. Your input map should not have the triggers in it. There are few reasons we do it this way instead of overwriting the triggers onto the original file- it protects your map from the off chance that it gets corrupted, it keeps the triggers units and locations (made by OT) from being added to your map multiple times, and it makes it so that you don't have to reload the map in Scmdraft after compiling.
Your typical work flow would go like this- keep the original/input map open in Scmdraft (for making physical changes to the map, like terran, units, sprites) and oreo triggers in whatever IDE your using (for making changes to the triggers). Whenever you make a change to the map in either Scmdraft or in Oreo Trigs, you recompile OT and the changes will appear in the output map. When you test in Starcraft, you test with your output map file (where all the physical map and triggers are combined).
To create a preplaced unit or location to the map using Mint Oreos, simply use these functions:
Download
Latest: http://www.mediafire.com/download/ycdjj5qn6s6k8x6/Oreo_Triggers_1.0.1.rar (1.0.1)
http://www.mediafire.com/?g7gg4is0zynm69k (0.9.6)
http://www.mediafire.com/?krvtr5chehnigyh (0.9.5)
http://www.mediafire.com/?ip3vukvy2v49dkn (0.9.4)
http://www.mediafire.com/?s9ff64op5c9dbjl (0.9.3)
http://www.mediafire.com/?5f52tuh0okxau39 (0.9.2)
http://www.mediafire.com/?8ku895s94z745t2 (0.9.1)
http://www.mediafire.com/?314bqvc3dww5mle (0.9.0)
http://www.mediafire.com/?i2ge65z9fpa8lof (0.8.5)
http://www.mediafire.com/?6w1uk4idger78ex (0.8.4)
http://www.mediafire.com/?ybhdc5xcspu2bgz (0.8.3)
http://www.mediafire.com/?e8do8gta41kud7e (0.8.2)
http://www.mediafire.com/?z82q778izt50i4s (0.8.1)
http://www.mediafire.com/?06kqb8050gk1458 (0.8)
Creating triggers
Every oreo trigger begins with a player object which must be defined before the trigger. Player objects can hold any number of players.
Example of creating new Player object (we're naming ours $Players):
$Players = new Player("Player 1", "Player 2", "Player 3");
Any trigger created with the player object you define will be owned by the players you specified when you created it.
There are 4 ways to start a trigger:
$Players->always( actions )
$Players->justonce( actions )
$Players->never( actions )
$Players->_if( conditions )->then( actions )
Version History
- 09/05/13 Lots of changes, see post notes (1.0.1)
- 11/08/12 Deathcounters can be used in Display Text. ->enter and ->exit for UnitGroups. Update checking (0.9.6)
- 09/24/12 Fixes mint bug with Dark Swarm Nuclear Missile becoming the wrong units, fixes bug with complex conditions and more (0.9.5)
- 08/23/12 A lot of changes, see notes (0.9.4)
- 07/12/12 Added Leaderboard functions, fixed centerview for mint, added ModifyHangar, and more bug fixes (0.9.3)
- 07/07/12 Added ForemostPlayer() function, Event and PlayerSwitch classes, fixed deathcounter division functions and other bug fixes. (0.9.2)
- 06/30/12 Added repeat() and MintMapRevealers() functions. Fixed a bug where it wasn't removing extraneous triggers, and a bug when using the Order action with Mint. (0.9.1)
- 06/26/12 Added support for all vanilla Conditions. Mint Extension released. Some bug fixes, a few more functions. LeaderBoard condition renamed to LeaderBoardPoints. (0.9.0)
- 06/17/12 Added Switch statements, and more UnitGroup, IndexedUnit and Deathcounter functions as well as some minor bugfixes (0.8.5)
- 06/08/12 Fixed create unit properties bug (0.8.4)
- 06/08/12 Player objects in conditions support, Create unit with properties support, orGroups (0.8.3)
- 06/07/12 Minor bug fix, Player in actions support, Comments moved to end of trigger (0.8.2)
- 06/02/12 Fixed a bug in deathcounter multiply functions (0.8.1)
- 06/02/12 Oreo Triggers Released (0.8)
Other Remarks
There are more classes I haven't touched and much more to tell, but it's late I'm tired of writing and I'm eager to release. Special thanks to Lethal Illusion for volunteering to do the Deathcounter math functions, the EUD classes and helping me test. More thanks: Roy, Yoonkwun, Farty1Billion for EUD work, Wormer for Macrotriggers documentation, and R1SKED911 for ever existing.
Remember, it's still in beta stage. Feel free to rifle through the code and change things to your liking (I recommend putting any additions you might make to a separate document and then just including them onto the proper page). Also feel free to contribute and make this thing even better.
Post has been edited 21 time(s), last time on Sep 6 2013, 2:02 am by Kaias.
None.